<%-- 
    Document   : admin
    Created on : Apr 5, 2011, 11:25:52 AM
    Author     : user
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%
    String baseURL = getServletContext().getContextPath();
    HttpSession sess = request.getSession(false);
    System.out.println(sess);
    String role = (String) sess.getAttribute("role");
    if(role == null || role.equalsIgnoreCase("admin") == false){
        if(role == null)
            response.sendRedirect("index.jsp");
        else if (role.equalsIgnoreCase("admin")== false)
            response.sendRedirect("chat.jsp");
    }
%>
<%@ include file="database.jsp" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>On Air -- Admin</title>
        <link rel="stylesheet" href="public/css/admin.css" type="text/css" media=screen />
        <script src="public/js/common.js" type="text/javascript"></script>
        <script src="public/js/ajax.js" type="text/javascript"></script>
        <script src="public/js/admin.js" type="text/javascript"></script>
        <script src="public/js/admin_user.js" type="text/javascript"></script>
        <script type="text/javascript">
            baseURL = "<%=baseURL%>";
        </script>
    </head>
    <body onload="init_category();">
        <div id="wrap">
            <div id="header">
                <div id="logo">
                    <img src="public/img/header_login.png" alt="logo" />
                </div>
                <div id="menu-bar" class="border">
                    <a href="Logout">Logout</a>
                </div>
            </div>
            <div class="clear"></div>
            <div id="content">
                <div id="menu-container">
                    <div class="menu" onClick="CategoryPanel.getDataAndRender();"><div class="inner">Category</div></div>
                    <div class="menu" onClick="init();"><div class="inner">User</div></div>
                </div>
                    <div id="user-column">
                    </div>
                <div id="left-column">
                    <div id="add-category">
                        
                    </div>
                    <div id="category-container">

                    </div>
                </div>
                <div id="right-column">
                    <div id="details">
                        <div id="subcategory-container">
                          
                        </div>
                    </div>
                </div>
                <div id="desc-user-column">

                </div>
                <div class="clear"></div>
            </div>
            <div id="footer">
                <div class="outer">
                    <div class="inner">onAIR ~ on Adi_Ifan_Rezan ~ Where talks is free.. :D
                    </div>
                </div>
            </div>
            <div class="clear"></div>
        </div>
    </body>
</html>